const root = '/api/'
const BaseGoodsUrl = root + "goods/"
const BaseOrderUrl = root + "order/"
const BaseUserUrl = root + "user/"
const BaseAccountUrl = root + "account/"
const BaseFileUrl = root + "file/"
const BasePermissionUrl = root + "permission/"
const BaseRoleUrl = root + "role/"
let api = {
    
    goods: {
        list: BaseGoodsUrl + "list",
        modify: BaseGoodsUrl + "modify",
        delete: BaseGoodsUrl + "delete",
        add: BaseGoodsUrl + "add"
    },

    order: {
        list: BaseOrderUrl + "list",
        modify: BaseOrderUrl + "modify",
        delete: BaseOrderUrl + "delete",
        add: BaseOrderUrl + "add"
    },

    user: {
        list: BaseUserUrl + "list",
        modify: BaseUserUrl + "modify",
        delete: BaseUserUrl + "delete",
        add: BaseUserUrl + "add",
        hasLogin: BaseUserUrl + "has_login",
        
    },
    account: {
        register: BaseAccountUrl + "register",
        login: BaseAccountUrl + "login",
    },

    file: {
        upload: BaseFileUrl + "upload"
    },
    permission: {
        list: BasePermissionUrl + "list",
        add: BasePermissionUrl + "add",
        modify: BasePermissionUrl + "modify",
        delete: BasePermissionUrl + "delete"
    },
    role: {
        list: BaseRoleUrl + "list",
        add: BaseRoleUrl + "add",
        modify: BaseRoleUrl + "modify",
        delete: BaseRoleUrl + "delete"

    }
}

export default api